Composition containers, also referred to in the art as dependency containers, dependency injection containers, inversion of control containers, etc., are component frameworks that are utilized to connect application modules and/or other components together. Composition containers operate by reading or inferring dependencies expressed in components and attempting to satisfy the dependencies by using instances and/or values from other components. A composition container has ownership of component instances it creates, thereby defining a lifetime and accessibility boundaries for such instances.
For some applications, however, conventional composition containers do not provide sufficient scoping granularity for lifetime and/or accessibility. For example, a multi-document application may desire to have its own copy of respective components (e.g., text buffer, undo manager, spell checker, etc.) per document opened. In order to achieve this in conventional implementations, components are required to set their own scope semantics (e.g., start a new scope when a new document is created, etc.) that handle the associated infrastructure logic. Accordingly, the component implementation is coupled with a particular composition container, making it less reusable and less testable as well as making its code less expressive.
The above-described deficiencies of today's computing system management techniques are merely intended to provide an overview of some of the problems of conventional systems, and are not intended to be exhaustive. Other problems with conventional systems and corresponding benefits of the various non-limiting embodiments described herein may become further apparent upon review of the following description.